import './globals.css';
import type { Metadata } from 'next';

import '@fortawesome/fontawesome-free/css/all.min.css';
import '@/style/ant.css';
import '@/style/third.css';

import AntdProvider from '@/lib/provider/antd-provider';
import StyledComponentsRegistry from '@/lib/provider/antd-registry';
import SwrConfigProvider from '@/lib/provider/swr-config-provider';
import SpreadProvider from '@/lib/provider/spread-provider';

export const metadata: Metadata = {
  title: '智能会计教学平台',
  description: 'Generated by create next app',
};

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en" className="h-screen">
      <body className={`min-h-full bg-teal-50 text-blueGray-700`}>
        <SwrConfigProvider>
          <StyledComponentsRegistry>
            <AntdProvider>
              <SpreadProvider>
                <div className="flex-1 relative bg-teal-50 h-full flex flex-col">{children}</div>
              </SpreadProvider>
            </AntdProvider>
          </StyledComponentsRegistry>
        </SwrConfigProvider>
      </body>
    </html>
  );
}
